package com.example.ssm.service.impl;

import com.example.ssm.mapper.BaseDictMapper;
import com.example.ssm.pojo.BaseDict;
import com.example.ssm.pojo.BaseDictExample;
import com.example.ssm.service.IBaseDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("baseDictService")
public class BaseDictServiceImpl implements IBaseDictService {

        @Autowired
        private BaseDictMapper baseDictMapper;

        @Override
        public List<BaseDict> queryBaseDictByDictTypeCode(String dictTypeCode) {

            BaseDictExample baseDictExample=new BaseDictExample();
            BaseDictExample.Criteria criteria=baseDictExample.createCriteria();
            criteria.andDictTypeCodeEqualTo(dictTypeCode);

            return baseDictMapper.selectByExample(baseDictExample);

        }
}
